{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>我的报名</title>
    <link rel="stylesheet" href="{% static 'plugins/bootstrap-3.4.1/css/bootstrap.min.css' %}">
</head>
<body>
<nav class="navbar navbar-default">
    <div class="container">
        <div class="navbar-header">
            <a class="navbar-brand" href="#" style="padding-bottom: 50px;">
                <p style="color: #f5c400;margin-bottom: 0px;">驾校网上报名系统</p>
                <p style="color: #f5c400;font-size: 1px;margin-top: 0px;">Kashgar Xinlongji Trading Co., Ltd. product
                    library</p>
            </a>
        </div>
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                <li><a href="http://127.0.0.1:8000/user/1/index">首页</a></li>
<<<<<<< HEAD
                <li><a href="/mycart/">我的收藏{{ request.user.username }}</a></li>
=======
                <li><a href="/mycart/">我的收藏</a></li>
>>>>>>> f0eb04185cbc15f17a793618efb075babdcd937b
                <li><a href="/orders/">报名</a></li>
            </ul>
        </div>
    </div>
</nav>
<div class="panel panel-default" style="margin-top: 10px;">
    {% if  messages %}
        <div class="msg">
            {% for obj in messages %}
                <div class="alert alert-{{ obj.level_tag }}">
                    {{ obj.message }}
                </div>
            {% endfor %}
        </div>
    {% endif %}
    <div class="panel-heading">
        <span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>
        报名详情
    </div>
    <!-- Table -->
    <table class="table table-bordered">
        <thead>
        <tr>
            <th>驾校名称</th>
            <th>对应照片</th>
            <th>驾校类型</th>
            <th>套餐类型</th>
            <th>价格</th>
            <th>报名时间</th>
            <th>状态</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        {% for obj in queryset %}
            <tr>
                <td><a href="/goods/goodsdetails/{{ obj.goodsid }}/" style="color: red;">{{ obj.gname }}</a></td>
                <!--通过数据库中的session获取当前用户的名字-->
                <td><img src="/media/{{ obj.colorurl }}" alt="" style="width: 40px;height: 40px;"></td>
                <td>{{ obj.sname }}</td>
                <td>{{ obj.Category }}</td>
                <td>{{ obj.price }}</td>
                <td>{{ obj.order_date }}</td>
                <td>{{ obj.get_status_display }}</td>
                <td><a class="btn btn-danger" href="/orders/delete/{{ obj.id }}/">取消报名</a></td>
            </tr>
        {% endfor %}
        </tbody>
    </table>
</div>
</body>
</html>